Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sveltekit blog #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

polluterofminds
Copy link
Collaborator

NOT READY TO MERGE - DRAFT STATE

Hey guys, here's the early rough draft for the SvelteKit post using their handleError hook.

I actually ran into a problem where importing the Exceptionless node package throws this error:

require is not defined

Using the browser package does nothing. No errors, but no events either. Could be the way I'm calling startup but wanted to see if you spotted anything obvious as you reviewed.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Justin Hunter seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@polluterofminds
Copy link
Collaborator Author

@niemyjski @ejsmith - When either of you have a minute can you take a look at this. The post is ready to go, but the JS client isn't working due to the error I mentioned in the PR.

Comment on lines +72 to +73
/** @type {import('@sveltejs/kit').HandleError} */
export async function handleError({ error, request }) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to fix formatting here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you mean?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading whitespace before export and the comment.

@niemyjski
Copy link
Member

That's the error the clients getting and why it's not submitting.

Exceptionless:2021-10-20T13:21:55.975Z [error] Error running plugin "BrowserErrorPlugin": __vite_ssr_import_1__.fromError is not a function. Discarding Event.
Exceptionless:2021-10-20T13:21:56.248Z [debug] Processing queue...

https://vitejs.dev/guide/dep-pre-bundling.html#the-why Should just work but it doesn't vitejs/vite#3024

@niemyjski
Copy link
Member

niemyjski commented Oct 20, 2021

We need to consider possibly moving off of stacktracejs/stacktrace.js#230, this will also cause us to lose sourcemaps supports as mozilla doesn't support esm :.

Also svelte-kit doesn't support top level await so doing await on Exceptionless.startup won't work as npm run build won't work. We shouldn't publish this article until this works.

niemyjski added a commit to exceptionless/Exceptionless.JavaScript that referenced this pull request Oct 20, 2021
@ejsmith
Copy link
Member

ejsmith commented Oct 20, 2021

NOT READY TO MERGE - DRAFT STATE

Hey guys, here's the early rough draft for the SvelteKit post using their handleError hook.

I actually ran into a problem where importing the Exceptionless node package throws this error:

require is not defined

Using the browser package does nothing. No errors, but no events either. Could be the way I'm calling startup but wanted to see if you spotted anything obvious as you reviewed.

F'd by the stacktrace stuff again. It definitely seems like we are getting our butts kicked here. We definitely have work to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants